package my.project.feign.instance;

import my.project.feign.hystrix.ComputeClientHystrix;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by 哲 on 2016/11/29.
 * FeignClient注解绑定服务
 */
@FeignClient(value = "compute-service",fallback = ComputeClientHystrix.class)
public interface ComputeInstance {

    @RequestMapping(value = "/add",method = RequestMethod.GET)
    public Integer add(@RequestParam("a") Integer a,@RequestParam("b") Integer b);

}
